﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manager/Manager.Master" AutoEventWireup="true" CodeBehind="ManNhaDat.aspx.cs" Inherits="BatDongSan.Manager.ManNhaDat" Theme="cvkadmin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <asp:Label ID="lbStatus" runat="server" Font-Italic="True" ForeColor="#FF3300"></asp:Label>
    <div style="padding:10px;">
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    Nhà đất:
                </td>
                <td>
                    <asp:TextBox ID="txtNhaDat" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2"  style="padding:10px 10px 30px 0px;">
                    <asp:Button ID="btActiveNhaDat" runat="server" 
                        onclick="btActiveNhaDat_Click"/>
                </td>
            </tr>
        </table>
    </div>
    
    <div style="font-weight:bold;">
        Danh sách nhà đất:
    </div>
    <div>
       <asp:GridView ID="grvNhaDat" runat="server" AutoGenerateColumns="False" CssClass="TMain"
                    BorderStyle="Solid" BorderWidth="1px" CellPadding="4" GridLines="Vertical" Width="100%"
                    OnRowDataBound="grvNhaDat_RowDataBound" AllowPaging="True" 
                    onpageindexchanging="grvNhaDat_PageIndexChanging" PageSize="30">
                    <RowStyle CssClass="TItem" />
                    <Columns>
                        <asp:TemplateField HeaderText="STT">
                            <ItemTemplate>
                                <asp:Label ID="lblSTT" runat="server" Text='<%# Container.DataItemIndex+1 %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="10px" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Id" InsertVisible="False" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblId" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên">
                            <ItemTemplate>
                                <img src="/App_Themes/cvkadmin/images/news.jpg" /><asp:HyperLink ID="hplName" ToolTip="Click vào đây để Edit mẩu tin này" Font-Underline="false" runat="server" Text='<%# Eval("Name") %>'></asp:HyperLink>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Left" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Thứ tự">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPosition" runat="server" Width="50" />
                            </ItemTemplate>
                            <ItemStyle Width="50px"></ItemStyle>
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="#Ẩn" Visible="true">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkbtActive" Font-Bold="true" Font-Underline="false" runat="server"
                                    CausesValidation="False" OnClick="lnkbtActive_Click"></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="30px" />
                        </asp:TemplateField>
                        <asp:TemplateField ShowHeader="False" HeaderText="Xóa">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkbtDelete" runat="server" CausesValidation="False" Text="Xóa"
                                    OnClick="lnkbtDelete_Click"></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="30px" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle CssClass="TFooter" />
                    <PagerStyle CssClass="TFooter" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle CssClass="THeader" />
                    <AlternatingRowStyle CssClass="TItemA" />
                </asp:GridView>
    </div>
    <div style="padding:10px;">
        <asp:Button ID="btUpdatePosition" runat="server" Text="Cập nhật vị trí" 
            onclick="btUpdatePosition_Click" />
    </div>
</asp:Content>
